package com.example.park_management.utils;

import java.math.BigDecimal;
import java.math.BigInteger;

public class NumUtils_lh {
    public static Long getLongValue(Object num) {

        if (num instanceof BigInteger) {
            return ((BigInteger) num).longValue();
        }

        if (num instanceof BigDecimal) {
            return ((BigDecimal) num).longValue();
        } else {
            throw new RuntimeException("不是数字!");
        }


    }
}
